package com.dotflat.staffExtend.domain;

import com.dotflat.rest.domain.AreableObjectBase;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.*;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/7/13
 * *******************************
 */
@Entity
@Data
@Table(name = "ex_staff_extend_relation" )
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class StaffExtendRelation extends AreableObjectBase {

    @Column(columnDefinition = "varchar(32)  COMMENT '扩展记录id'")
    private String extendInfoId;

    @ManyToOne
    @JoinColumn(name = "extendInfoId", columnDefinition = "varchar(32) COMMENT '扩展记录id'", insertable = false, updatable = false)
    @JsonIgnore
    private StaffExtendInfo staffExtendInfo;

    @Column(columnDefinition = " bit DEFAULT 0 COMMENT '是否紧急联系人 0：否，1是' ")
    private Boolean emergency = false;

//    姓名 关系 年龄 学历 电话 单位
    @Column(columnDefinition = " varchar(32)  COMMENT '姓名'")
	private String name;

	@Column(columnDefinition = " varchar(32)  COMMENT '关系'")
	private String relation;

    @Column(columnDefinition = " varchar(32)  COMMENT '关系'")
    private String education;

    @Column(columnDefinition = " varchar(32)  COMMENT '关系'")
    private String company;

	@Column(columnDefinition = " varchar(32)  COMMENT '电话'")
	private String phone;
}
